3.349 \(\int \frac{\cosh ^2(x)}{1-\sinh ^2(x)} \, dx\)

Optimal. Leaf size=19 \[ \sqrt{2} \tanh ^{-1}\left (\sqrt{2} \tanh (x)\right )-x \]

[Out]

-x + Sqrt[2]*ArcTanh[Sqrt[2]*Tanh[x]]

________________________________________________________________________________________

Rubi [A]  time = 0.0450643, antiderivative size = 19, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {3191, 391, 206} \[ \sqrt{2} \tanh ^{-1}\left (\sqrt{2} \tanh (x)\right )-x \]

Antiderivative was successfully verified.

[In]

Int[Cosh[x]^2/(1 - Sinh[x]^2),x]

[Out]

-x + Sqrt[2]*ArcTanh[Sqrt[2]*Tanh[x]]

Rule 3191

Int[cos[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = FreeF
actors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1), x], x, T
an[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]

Rule 391

Int[1/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x^n),
 x], x] - Dist[d/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\cosh ^2(x)}{1-\sinh ^2(x)} \, dx &=\operatorname{Subst}\left (\int \frac{1}{\left (1-2 x^2\right ) \left (1-x^2\right )} \, dx,x,\tanh (x)\right )\\ &=2 \operatorname{Subst}\left (\int \frac{1}{1-2 x^2} \, dx,x,\tanh (x)\right )-\operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\tanh (x)\right )\\ &=-x+\sqrt{2} \tanh ^{-1}\left (\sqrt{2} \tanh (x)\right )\\ \end{align*}

Mathematica [A]  time = 0.0756311, size = 24, normalized size = 1.26 \[ -2 \left (\frac{x}{2}-\frac{\tanh ^{-1}\left (\sqrt{2} \tanh (x)\right )}{\sqrt{2}}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Cosh[x]^2/(1 - Sinh[x]^2),x]

[Out]

-2*(x/2 - ArcTanh[Sqrt[2]*Tanh[x]]/Sqrt[2])

________________________________________________________________________________________

Maple [B]  time = 0.023, size = 54, normalized size = 2.8 \begin{align*} \sqrt{2}{\it Artanh} \left ({\frac{\sqrt{2}}{4} \left ( 2\,\tanh \left ( x/2 \right ) +2 \right ) } \right ) -\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) +\sqrt{2}{\it Artanh} \left ({\frac{\sqrt{2}}{4} \left ( 2\,\tanh \left ( x/2 \right ) -2 \right ) } \right ) +\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(x)^2/(1-sinh(x)^2),x)

[Out]

2^(1/2)*arctanh(1/4*(2*tanh(1/2*x)+2)*2^(1/2))-ln(tanh(1/2*x)+1)+2^(1/2)*arctanh(1/4*(2*tanh(1/2*x)-2)*2^(1/2)
)+ln(tanh(1/2*x)-1)

________________________________________________________________________________________

Maxima [B]  time = 1.70328, size = 86, normalized size = 4.53 \begin{align*} \frac{1}{2} \, \sqrt{2} \log \left (-\frac{\sqrt{2} - e^{\left (-x\right )} + 1}{\sqrt{2} + e^{\left (-x\right )} - 1}\right ) - \frac{1}{2} \, \sqrt{2} \log \left (-\frac{\sqrt{2} - e^{\left (-x\right )} - 1}{\sqrt{2} + e^{\left (-x\right )} + 1}\right ) - x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)^2/(1-sinh(x)^2),x, algorithm="maxima")

[Out]

1/2*sqrt(2)*log(-(sqrt(2) - e^(-x) + 1)/(sqrt(2) + e^(-x) - 1)) - 1/2*sqrt(2)*log(-(sqrt(2) - e^(-x) - 1)/(sqr
t(2) + e^(-x) + 1)) - x

________________________________________________________________________________________

Fricas [B]  time = 1.56854, size = 220, normalized size = 11.58 \begin{align*} \frac{1}{2} \, \sqrt{2} \log \left (-\frac{3 \,{\left (2 \, \sqrt{2} - 3\right )} \cosh \left (x\right )^{2} - 4 \,{\left (3 \, \sqrt{2} - 4\right )} \cosh \left (x\right ) \sinh \left (x\right ) + 3 \,{\left (2 \, \sqrt{2} - 3\right )} \sinh \left (x\right )^{2} - 2 \, \sqrt{2} + 3}{\cosh \left (x\right )^{2} + \sinh \left (x\right )^{2} - 3}\right ) - x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)^2/(1-sinh(x)^2),x, algorithm="fricas")

[Out]

1/2*sqrt(2)*log(-(3*(2*sqrt(2) - 3)*cosh(x)^2 - 4*(3*sqrt(2) - 4)*cosh(x)*sinh(x) + 3*(2*sqrt(2) - 3)*sinh(x)^
2 - 2*sqrt(2) + 3)/(cosh(x)^2 + sinh(x)^2 - 3)) - x

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)**2/(1-sinh(x)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.17485, size = 55, normalized size = 2.89 \begin{align*} -\frac{1}{2} \, \sqrt{2} \log \left (\frac{{\left | -4 \, \sqrt{2} + 2 \, e^{\left (2 \, x\right )} - 6 \right |}}{{\left | 4 \, \sqrt{2} + 2 \, e^{\left (2 \, x\right )} - 6 \right |}}\right ) - x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)^2/(1-sinh(x)^2),x, algorithm="giac")

[Out]

-1/2*sqrt(2)*log(abs(-4*sqrt(2) + 2*e^(2*x) - 6)/abs(4*sqrt(2) + 2*e^(2*x) - 6)) - x